
<%@ include file="/common/taglibs.jsp"%>
<!--分页查询共用的页面-->
<%@ include file="/common/common.jsp"%>
<%@ page language="java" pageEncoding="UTF-8"%>

	

<script>
function doRemove()
			{
				var ptId = "${routeSegment.entityId}";
				if(ptId != "0")
				{
					parent.MapTree.deleteLimitSpeedPoint(ptId);
				}
				parent.closeMapAreaWindow();
			}

$().ready(function() {
	 $("#entityForm").validate(); //初始化验证信息
	 Utility.ajaxForm("entityForm", {

         success: function(responseText){
		       var result = responseText;
			   if (result.success) {
		             alert("保存成功!");
					 window.close();
					 //var seg = result.data;
					// parent.createLimitSpeedPoint(seg.routeId,seg.entityId,seg.name,
						 //seg.latitude1,seg.longitude1);
			   }else				   
			 {
				   alert("保存失败，错误:"+ result.message);
			 }
		 }

	});
	
});
</script>
 <BODY>
	<form id="entityForm" name="entityForm" 
			action='<%=ApplicationPath%>/mapArea/saveRouteSegment.action' method="POST">
				<input type="hidden" name="entityId"
					value="${routeSegment.entityId}"/>
			  <input type="hidden" name="routeId" id="routeId" 
					value="${routeSegment.routeId}" />
		<input type="hidden" name="startSegId" id="startSegId"
			   value="${routeSegment.startSegId}" />
		<input type="hidden" name="endSegId" id="endSegId"
			   value="${routeSegment.endSegId}" />
  <table width="100%"  class="TableBlock">
					<tbody><tr>
						<td colspan="4" style="font-weight: bold; background: #EFEFEF;" height="25">分段限速信息
						<span class="message">${message}</span>
						</td>
					</tr>
					<tr>
						<td>线段名称:</td>
						<td align="left" colspan=3><input  id="name" value="${routeSegment.name}"
						name="name" class="required" maxlength="10" maxlength="11" size="20"> 
						</td>
					</tr>
					
					
					
					<tr>
						<td>路段最高速度(km/h):</td>
						<td align="left"><input  id="maxSpeed" value="${routeSegment.maxSpeed}"
						name="maxSpeed" class="required number" maxlength="10" maxlength="11" size="20"> 
						</td>
						<td align="right">延时报警(秒)
							:</td>
						<td>
						<input  id="delay" value="${routeSegment.delay}"
						name="delay" maxlength="10" maxlength="11" size="20" class="required digits" > 
						   </td>
					</tr>
					
					<tr>
						<td colspan=4 align=center>
						
						   <button type="submit" class="button gray medium" >保存</button> 
						   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
						   <button type="button" class="button gray medium" onclick="doRemove();" >删除</button>
						</td>
					</tr>
				</tbody></table>

				
			</div>
 </BODY>
</HTML>
